#ifndef __COMMON_TYPE__
#define __COMMON_TYPE__

//
//	define struct macro
//
#define DEFINE_STRUCT_1(STRUCTNAME, T1, V1)					\
struct STRUCTNAME											\
{															\
	T1 V1;													\
};

#define DEFINE_STRUCT_2(STRUCTNAME, T1, V1, T2, V2)			\
struct STRUCTNAME											\
{															\
	T1 V1;													\
	T2 V2;													\
};

#define DEFINE_STRUCT_3(STRUCTNAME, T1, V1, T2, V2, T3, V3) \
struct STRUCTNAME											\
{															\
	T1 V1;													\
	T2 V2;													\
	T3 V3;													\
};

#define DEFINE_STRUCT_4(STRUCTNAME, T1, V1, T2, V2, T3, V3, T4, V4) \
struct STRUCTNAME													\
{																	\
	T1 V1;															\
	T2 V2;															\
	T3 V3;															\
	T4 V4;															\
};

#define DEFINE_STRUCT_5(STRUCTNAME, T1, V1, T2, V2, T3, V3, T4, V4, T5, V5) \
struct STRUCTNAME															\
{																			\
	T1 V1;																	\
	T2 V2;																	\
	T3 V3;																	\
	T4 V4;																	\
	T5 V5;																	\
};

#define DEFINE_STRUCT_6(STRUCTNAME, T1, V1, T2, V2, T3, V3, T4, V4, T5, V5, T6, V6) \
struct STRUCTNAME																	\
{																					\
	T1 V1;																			\
	T2 V2;																			\
	T3 V3;																			\
	T4 V4;																			\
	T5 V5;																			\
	T6 V6;																			\
};

#define DEFINE_STRUCT_7(STRUCTNAME, T1, V1, T2, V2, T3, V3, T4, V4, T5, V5, T6, V6, T7, V7) \
struct STRUCTNAME																			\
{																							\
	T1 V1;																					\
	T2 V2;																					\
	T3 V3;																					\
	T4 V4;																					\
	T5 V5;																					\
	T6 V6;																					\
	T7 V7;																					\
};

#define DEFINE_STRUCT_8(STRUCTNAME, T1, V1, T2, V2, T3, V3, T4, V4, T5, V5, T6, V6, T7, V7, T8, V8) \
struct STRUCTNAME																					\
{																									\
	T1 V1;																							\
	T2 V2;																							\
	T3 V3;																							\
	T4 V4;																							\
	T5 V5;																							\
	T6 V6;																							\
	T7 V7;																							\
	T8 V8;																							\
};


//
//	basic data type
//
typedef char				int8;
typedef unsigned char		uint8;

typedef short				int16;
typedef unsigned short		uint16;

typedef int					int32;
typedef unsigned int		uint32;

typedef __int64				int64;
typedef unsigned __int64	uint64;




//
//	use
//

//	int8	: sex,job,headpic, errcode
//	uint8	:	
//	int16	: sceneid, int16, itemdur, 
//	uint16	:
//	int32	:
//	uint32	: entityid, uint32, exp, money
//	int64	:
//	uint64	:


//	gender int8
enum
{
	SEX_FEMALE	= 0,
	SEX_MALE	= 1,
	SEX_NONE	= 2,
};



//	error code int16
enum
{
	//
	//	general error information
	//
	ERR_SUCCESS							= 0,					//	success
	ERR_FAILED							= 1,					//	general failure
	ERR_INVALID_SESSION					= 2,					//	invalid session id
	ERR_INVALID_PARAMS					= 3,					//	invalid paramters
	ERR_DATA_NOT_READY					= 4,					//	data not loaded yet or 
	ERR_LEVEL_TOO_LOW					= 5,
	ERR_LEVEL_TOO_HIGH					= 6,
	ERR_NOT_ENOUGH_PLAYER				= 7,
	ERR_STILL_IN_COOLDOWN				= 8,

	//
	//	error information for login
	//
	ERR_FAILED_ALREADY_LOGIN			= 10,

};







#endif